package com.kaifamiao.stock.mapper;

import com.kaifamiao.stock.domain.Stock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface StockMapper {
    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(Stock record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(Stock record);

    List<Stock> selectAll();

    List<Stock> selectByCode(String code);

    List<Stock> selectByAllName();

    List<Stock> selectByTime(String code, Date startTime);
}